#define _CRT_SECURE_NO_WARNINGS  1
#include<iostream>
#include<vector>

using namespace std;

class student
{

private:
	int _num = 1;
};

class teacher:virtual public student
{

private:
	int _num = 1;
};

class person1 :virtual public student
{
	int _num = 2;
};
class person2 :public teacher,public student
{

	int _num = 2;
};


int main()
{
	student s;
	teacher t;
	person1 p1;
	person2 p2;

	

	return 0;
}



#if 0
template<class T>
class stack 
{
public:
	
	void push(const T& x)
	{
		v.push_back(x);
	}

	void pop()
	{
		v.pop_back();
	}

	const T& top()
	{
		return v.back();
	}
	vector<T> v;
};


int main()
{
	//vector<int> v;
	//v.push_back(1);
	stack<int> st;
	st.push(12);

	return 0;
}



	person p;
	student s;
	int& num = s.contorlnum();
	num = 11;
	s.Print();


	class person
	{
	public:
		person(int age = 0, int gender = 1, char* name = new char[12])
			:_age(age)
			, _gender(gender)
			, _name(name)
		{}

		~person()
		{
			_age = _gender = -1;
			delete[]_name;
		}

		int& contorlnum()
		{
			return number;
		}

		void Print()
		{
			cout << number << endl;
		}

	protected:
		int _age;
		int _gender = 1;
		char* _name;
	private:
		int number = 10;
	};

	class student : public person
	{
	public:

		student()
			:person()
			, _number(03)
			, _major(1)
		{}



	private:
		int _number;
		int _major;
	};
#endif // 0
